import {secret} from '../../../utils/secret'

export const CHANG_LIST = 'CHANG_LIST'

const changeListAction = list => ({
  type: CHANG_LIST,
  list
})

export const getHomeList = () => {
  return (dispatch, getState, axiosInstance) => {
    return axiosInstance.get('/api/news.json').then(res => {
      const list = res.data.data
      dispatch(changeListAction(list))
    })
  }
}
